<{include file="top_v2.html" }>
</head>
<body>
<div id="wrap" class="pt pb list-page">
    <div class="header">
        <{if $objType == 1}>报名用户<{else}>活动入选用户<{/if}>
        <a href="javascript:window.history.back();" class="back"></a>
    </div>

    <ul class="praise-comment">

    </ul>
</div>

</body>
</html>

<script>
    var objType="<{$objType}>";
    var objID="<{$objID}>";


    //拖动加载
    var flagData = true;
    var flagAjax = true;
    var page=1;

    function load_more(){
        if(! flagAjax){
            return false;
        }
        flagAjax = false;
        loadObj =  load();
        $.getJSON("<{u('Events/loadMoreLog')}>", {page:page,type:objType,id:objID}, function(data){
            layer.close(loadObj);
            flagAjax = true;
            if(data.status!=0){
                flagData = false;
            } else {
                $(".praise-comment").append(data.dataHTML);
                fixUserHead();
                page++;
                if(data.isPage == 0){
                    flagData = false;
                }
            }
        });
    }

    var tmp_scroll = 0;
    $(window).scroll(function() {
        if ($(this).scrollTop() + $(window).height() + 20 >= $(document).height() && $(this).scrollTop() > 10) {
            if (flagData){
                load_more();
            }
        }

    });
    load_more();

</script>

